﻿using System;
using System.Windows.Input;
using EDMDesigner.Designer.Controls.Util;
using System.Windows.Controls;

namespace EDMDesigner.Designer.Controls.CSDLType
{
    public class TypeBaseExpander : Expander
    {
        protected override void ClickOnTheHeader()
        {
            base.ClickOnTheHeader();
            OnClick();
        }
        protected override void OnMouseDown(MouseButtonEventArgs e)
        {
            base.OnMouseDown(e);
            OnClick();
        }

        protected virtual void OnClick()
        {
            if (Click != null)
                Click();
        }

        public event Action Click;
    }
}
